#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
using namespace std;


class A
{
public:
	A(int a = 0)
		:_a(a)
	{
		cout << "A(int a = 0)" << endl;
	}

	~A()
	{
		cout << "~A()" << endl;
	}

	void print()
	{
		cout << _a << endl;
	}




private:
	int _a;
};


int main()
{
	A* p1 = new A;
	A* p2 = new A(5);
	p1->print();
	p2->print();
	delete p1;
	delete p2;

	//A* p3 = new A[10];
	A* p4 = new A[10]{ 1,2,3,4,5,6,7,8,9};
	/p3->print();

	//p4->print();
	//delete[] p3;
	delete[] p4;

	return 0;
}